#include <iostream>
#include <vector>
template <typename E>
void printVector(const std::vector<E> &v)
{
    for (const E &e : v)
    {
        std::cout << e << " ";
    }
    std::cout << std::endl;
}

template <typename E>
void print(const E &e)
{
    std::cout << e << std::endl;
}

int main(int argc, char const *argv[])
{
    std::vector<int> v = {1, 3, 2, 4, 0, 1, 2, 6, 4, 0};
    print(v.at(9));
    print(v[9]);

    int &a = v[3];
    print(a);
    a = 99;
    printVector(v);

    print(v.front());
    print(v.back());

    v.pop_back();
    printVector(v);

    return 0;
}
